import { Component, OnInit } from '@angular/core';
var base=require('modules/base.js');

@Component({
  selector: 'app-collage',
  templateUrl: './collage.component.html',
  styleUrls: ['./collage.component.less']
})
export class CollageComponent implements OnInit {
	college=[{
		title: '大学综合排名',
		content: []
	}, {
		title: '大学竞争力排名',
		content: []
	}, {
		title: '毕业薪酬排名',
		content: []
	}];
  constructor() { 
  	var that = this;
		base.request(base.api(22), { type: "", page: 1 }, function (d) {
			that.college[0].content = d.data.slice(0, 4);
		});
		base.request(base.api(22), { type: "salary", page: 1 }, function (d) {
			that.college[1].content = d.data.slice(0, 4);
		});
		base.request(base.api(22), { type: "pay", page: 1 }, function (d) {
			that.college[2].content = d.data.slice(0, 4);
		});
  }

  ngOnInit() {
  }

}